package xy.strategy.design.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import xy.strategy.design.service.SeasonsFactory;

@RestController
public class TestController {

    @Autowired
    private SeasonsFactory seasonsFactory;

    @GetMapping("/strategyTest/{seasons}/{beanName}")
    public String strategyTest(@PathVariable("seasons") String seasons, @PathVariable("beanName") String beanName) {
        String handle = seasonsFactory.handle(seasons, beanName);
        return handle;
    }
}
